﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace ESpilWebservicePrototype.ViewModels
{
    public class FriendsViewModel
    {
        public User Friend { get; set; }
        public User User { get; set; }

        public static FriendsViewModel FromModel(Friends model)
        {
            ESpilService service = new ESpilService();
            User friend = service.GetUser(model.FriendID);
            User user = service.GetUser(model.UserID);

            FriendsViewModel vm = new FriendsViewModel() { Friend = friend, User = user };
            return vm;
        }
    }
}